
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">



  /* default css */
  
  table {
    font-size: 1em;
  }

  
  div, address, ol, ul, li, option, select { 
    margin-top: 0px;
    margin-bottom: 0px;
  }

  p {
    margin: 0px;
  }

  body {
    padding: 0px;
    
    
      margin: 0px;
    
  }

  h6 { font-size: 10pt }
  h5 { font-size: 11pt }
  h4 { font-size: 12pt }
  h3 { font-size: 13pt }
  h2 { font-size: 14pt }
  h1 { font-size: 16pt }

  blockquote {padding: 10px; border: 1px #DDD dashed }

  a img {border: 0}

  strike { text-decoration: line-through }

  div.google_header, div.google_footer {
    position: relative;
    margin-top: 1em;
    margin-bottom: 1em;
  }
  /* end default css */

  
    /* default print css */
    @media print {
      body { 
        padding: 0; 
        margin: 0; 
      }

      ol[type="a"] { list-style-type: lower-alpha }
      ol[type="A"] { list-style-type: upper-alpha }
      ol[type="i"] { list-style-type: lower-roman }
      ol[type="I"] { list-style-type: upper-roman }
    
      div.google_header, div.google_footer {
        display: block;
        min-height: 0;
        border: none;
      }

      div.google_header {
        flow: static(header);
      }

      /* used to insert page numbers */
      div.google_header::before, div.google_footer::before {
        position: absolute;
	top: 0;
      }

      div.google_footer {
        flow: static(footer);
      }

      /* always consider this element at the start of the doc */
      div#google_footer {
        flow: static(footer, start);
      }

      span.google_pagenumber {
        content: counter(page);
      }

      span.google_pagecount {
        content: counter(pages);
      }
    }

    @page {
      @top {
        content: flow(header);
      }
      @bottom {
        content: flow(footer);
      }
    }
    /* end default print css */
   
  
  /* custom css */
  
  
  /* end custom css */

  /* ui edited css */
  
  body {
    font-family: Verdana;
    
    font-size: 10.0pt;
    line-height: normal;
    background-color: #ffffff;
  }
  /* end ui edited css */




</style>


</head>

<body
    
    
    revision="dgtsd5n5_8c7rh3m:156">

    
    
<P>
  Populate has many command line options to control interpretation of xml files
  containing your meta-data. You can do it all in one shot, but it's probably
  easier to do it in stages.
</P>
<P>
  <BR>
</P>
<H3>
  <B>Create the database tables</B>
</H3>
Each time it runs, populate will ensure that the necessary database tables are
created. If they don't already exist, it will also copy the rows from the
globals and raw_facet_type tables of the wpa database. Running with only the
database login information gives you a chance to edit these two tables before
loading your data.
<SPAN style="FONT-FAMILY:Courier New"><SPAN style=FONT-FAMILY:Verdana>See the
<A href=Database_Schema.html id=admt title="schema description">schema
description</A> for help with these tables. In the
<FONT face="Courier New">raw_facet_type</FONT> table, you will probably want to
update the <FONT face="Courier New">sort</FONT> column.</SPAN></SPAN><BR>
<BR>
<SPAN style="FONT-FAMILY:Courier New">java -jar populate.jar -db &lt;your
database name&gt; -user bungee -pass &lt;your password&gt;<BR>
<BR>
</SPAN>
<H3>
  <SPAN style="FONT-FAMILY:Courier New"><SPAN style=FONT-FAMILY:Verdana><B>Read
  the meta-data from xml files</B></SPAN></SPAN>
</H3>
The <FONT face="Courier New">-files</FONT> argument takes a comma-delimited list
of xml files to process. The <FONT face="Courier New">-directory</FONT>
argument, if present, is prepended to each file to generate a full pathname.
populate was written to process
<A href=http://www.openarchives.org/OAI/openarchivesprotocol.html id=c55t title=OAI-format>OAI-format</A>
files using either MARC or Dublin Core encodings. The only elements it really
needs are <FONT face="Courier New">&lt;record&gt;</FONT> and MARC or DC
attributes. If you aren't using these encodings, you can use the DC attribute
<FONT face="Courier New">&lt;subject&gt;</FONT> for everything and then break
out the categories you use with the <FONT face="Courier New">-moves</FONT>
argument, described below. See the example MARC and DC xml files provided, or
this example to roll your own:<BR>
<BR>
<FONT face="Courier New">&lt;record&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;dc:subject&gt; location -- North America -- United States
-- Pennsylvania &lt;/dc:subject&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;dc:subject&gt; date -- 21st Century -- 2000s -- 2008
&lt;/dc:subject&gt;<BR>
&lt;/record&gt;<BR>
&lt;record&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;dc:subject&gt; location -- North America -- United States
-- Ohio ; date -- 21st Century -- 2000s -- 2007 &lt;/dc:subject&gt;<BR>
&lt;/record&gt;</FONT><BR>
<BR>
The two forms above, with either multiple
<FONT face="Courier New">&lt;dc:subject&gt;</FONT> elements or
semi-colon-delimited hierarchies, are equivalent. Hierarchy levels are delmited
by <FONT face="Courier New">' -- '</FONT>.<BR>
<BR>
If you are working from existing MARC or DC data, you should also provide the
<FONT face="Courier New">-cities</FONT> and
<FONT face="Courier New">-renames</FONT> arguments to work around some common
problems with repurposing cataloging data into multiple independent facet
hierarchies. You can add to the files provided. Rename.txt is a tab-delimited
file with two columns: tag names from the first column are replaced with tag
names from the second column. This is most useful for misspellings, or when
multiple terms are used for the same concept. Places.txt is a list of locations
that might be encountered in <FONT face="Courier New">&lt;subject&gt;</FONT>
elements of the form "<FONT face="Courier New">location ([city][.][,]
US_state)".</FONT> If <FONT face="Courier New">location</FONT> is on the list,
it will be added as if the tag was encoded "<FONT face="Courier New">Places --
state -- city -- location</FONT>". Otherwise it is treated as
"<FONT face="Courier New">Subject -- location;Places -- state -- city</FONT>".
Here's an example of performing this step:<BR>
<BR>
<SPAN style="FONT-FAMILY:Courier New">java -jar populate.jar -db &lt;your
database name&gt; -user bungee -pass &lt;your password&gt; -directory C:\bungee\
-files wpa.xml -cities Places.txt -renames Rename.txt<BR>
<BR>
</SPAN>
<P style=FONT-FAMILY:Verdana>
  If you want to start from scratch and re-load the files, add the
  <FONT face="Courier New">-reset</FONT> option. This will clear the
  <FONT face="Courier New">raw_facet, raw_item_facet</FONT>, and
  <FONT face="Courier New">item</FONT> tables.
</P>
<P>
  &nbsp;
</P>
<H3>
</H3>
<H3>
  Update the facet hierarchies
</H3>
<P>
  MARC and Dublin Core are too flat for effective faceted navigation. Populate
  uses the LC Thesaurus for Graphic Materials
  (<A href=http://www.loc.gov/rr/print/tgm1/ id=mv4i title="TGM I">TGM I</A> and
  <A href=http://www.loc.gov/rr/print/tgm2/ id=th22 title="TGM II">TGM II</A>)
  and Geographic Area Codes
  (<A href=http://www.loc.gov/marc/geoareas/gacshome.html id=j7x: title=GAC>GAC</A>)
  hierarchies to further organize your meta-data. This will only work to the
  extent that your meta-data uses the same names as these authorities. The files
  MyTGM and MyGAC have already been edited to work better with Bungee View. You
  can add rows to these files that match your names and connect them
  appropriately. You can also reorganize the hierarchy to your heart's content.
</P>
<P>
  &nbsp;
</P>
<P>
  For instance, if you put everything under
  <FONT face="Courier New">Subject</FONT> as in the example above, you can now
  expand them with these lines in the file:
</P>
<P>
  &nbsp;
</P>
<P>
  <FONT face="Courier New">Subject --
  Location&nbsp;&nbsp;&nbsp;&nbsp;Location</FONT>
</P>
<P>
  <FONT face="Courier New">Subject -- Date&nbsp;&nbsp;&nbsp;&nbsp;Date</FONT>
</P>
<P>
  &nbsp;
</P>
<P>
  To use <FONT face="Courier New">-moves</FONT> files, run populate like this:<BR>
  <BR>
  <FONT face="Courier New">java -jar populate.jar -moves MyTGM,MyGAC</FONT>
</P>
<P>
  <BR>
  Populate will probably complain a lot about the data files as it integrates
  them with the heuristic files. Usually this only happens with
  <FONT face="Courier New">subject</FONT> attributes. Go back and edit the
  <FONT face="Courier New">-cities</FONT>,
  <FONT face="Courier New">-renames</FONT>, and
  <FONT face="Courier New">-moves</FONT> files if you want to fix any of the
  problems, and run populate again. It may take several iterations before you
  are satisfied. You can also edit the data files, but if you want to
  re-generate the database as your collection changes, edits to the data files
  will be lost.<BR>
  <BR>
  <BR>
  <BR>
</P></body>
</html>
